# Contributor: Lee Hinman <hinman@gmail.com>
# Maintainer: Will Sinatra <wpsinatra@gmail.com>
pkgname=mg
pkgver=20200723
pkgrel=0
pkgdesc="microscopic EMACS style editor"
url="https://github.com/hboetes/mg"
arch="all"
license="Public-Domain"
makedepends="ncurses-dev libbsd-dev bsd-compat-headers"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/hboetes/mg/archive/$pkgver.tar.gz"

build() {
	make prefix=/usr mandir=/usr/share/man
}

package() {
	make INSTALL=install DESTDIR="$pkgdir" prefix=/usr \
		mandir=/usr/share/man install

	mkdir -p "$pkgdir"/usr/share/doc/$pkgname
	install -m644 README README.md tutorial \
		"$pkgdir"/usr/share/doc/$pkgname
}

sha512sums="8e481cf4981b93dba95b3b318f44dda15e580962216d452ce2fddcd19b86e4686673ba84d092bfaa540533b227428bd3bc9e6becda69be881d930937b0ea7add  mg-20200723.tar.gz"
